import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import index from '@/components/index'
import dataSurvey from '@/components/dataSurvey'
import carAdmin from '@/components/carAdmin'
import lineAdmin from '@/components/lineAdmin'
import payAdmin from '@/components/payAdmin'
import userList from '@/components/userList'
import orderAdmin from '@/components/orderAdmin'
import extension from '@/components/extension'
import bannerAdmin from '@/components/bannerAdmin'
import allMoneyLine from '@/components/allMoneyLine'
import addUser from '@/components/addUser'
import changePassword from '@/components/changePassword'
import addRole from '@/components/addRole'
import addPermission from '@/components/addPermission'
import userAdmin from '@/components/userAdmin'
import permissionList from '@/components/permissionList'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/index', // 主页
      name: 'index',
      component: index
    },
    {
      path: '/dataSurvey', // 数据概况
      name: 'dataSurvey',
      component: dataSurvey
    },
    {
      path: '/carAdmin', // 车辆管理
      name: 'carAdmin',
      component: carAdmin
    },
    {
      path: '/lineAdmin', // 线路管理
      name: 'lineAdmin',
      component: lineAdmin
    },
    {
      path: '/payAdmin', // 体现审核
      name: 'payAdmin',
      component: payAdmin
    },
    {
      path: '/userList', // 用户列表
      name: 'userList',
      component: userList
    },
    {
      path: '/orderAdmin', // 订单派发
      name: 'orderAdmin',
      component: orderAdmin
    },
    {
      path: '/extension', // 推广管理
      name: 'extension',
      component: extension
    },
    {
      path: '/bannerAdmin', // 系统设置
      name: 'bannerAdmin',
      component: bannerAdmin
    },
    {
      path: '/allMoneyLine', // 资产数据
      name: 'allMoneyLine',
      component: allMoneyLine
    },
    {
      path: '/addUser', // 添加用户
      name: 'addUser',
      component: addUser
    },
    {
      path: '/changePassword', // 修改密码
      name: 'changePassword',
      component: changePassword
    },
    {
      path: '/addRole', // 角色管理
      name: 'addRole',
      component: addRole
    },
    {
      path: '/addPermission', // 权限管理
      name: 'addPermission',
      component: addPermission
    },
    {
      path: '/userAdmin', // 用户管理
      name: 'userAdmin',
      component: userAdmin
    },
    {
      path: '/permissionList', // 权限列表
      name: 'permissionList',
      component: permissionList
    }
  ]
})
